package com.ming.config_client.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: tangC
 * @Date: 2020/6/5 15:08
 * @Description:
 */
@RestController
@RefreshScope
@RequestMapping("config_client")
public class TestController {

    @Value("${spring.datasource.name}")
    private String username;


    @GetMapping("test")
    public String test(){
        return username+6666;
    }
}
